package com.wgh.demo.ai.enums;

/**
 * AI模型类型枚举
 */
public enum AiModelType {
    ALIBABA("alibaba", "阿里AI大模型"),
    DEEPSEEK("deepseek", "DeepSeek大模型");

    private final String code;
    private final String name;

    AiModelType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    /**
     * 根据编码获取枚举值
     * @param code 编码
     * @return 枚举值
     */
    public static AiModelType getByCode(String code) {
        for (AiModelType modelType : values()) {
            if (modelType.code.equals(code)) {
                return modelType;
            }
        }
        return null;
    }
}